<template>

  <div  v-show="visible">
    <div>
      <transition v-show="visible" name="van-fade">
        <div id="mainhead">
          <NavBar @showpop="showpop()" :navinfo="navinfo"></NavBar>
        </div>
      </transition>
      <div id="main" :style="{'max-height':slide_h,'min-height':'200px'}" style="overflow-y: auto">
        <div v-if="data==null">
          <div class="p-tb20 text-center ">{{PRO_CONSTANT.IS_LOADING_EMPTY}}</div>
        </div>
        <div v-else class="p-15">
          <div class="p-tb5"></div>
          <div v-html="data.content"></div>
          <div class="border-b p-tb20"></div>
          <!--<div class="p-tb5">-->
            <!--<div class="p-tb5 title12 text-right">{{data.createTime}}</div>-->
          <!--</div>-->
        </div>
        <div class="p-tb10 title12 text-center">
          {{this.$store.getters.getConfig().companyName}}
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  const NavBar = () =>
    import ('@/components/header/NavBar');
  export default {
    name: "memberWithdrawPwd",
    components: {
      'NavBar': NavBar,
    },
    data() {
      return {
        visible: false,
        navinfo: {
          title: '',
          leftText: '返回',
          leftIcon: '',
          leftLink: '',
          rightText: '',
          rightIcon: '',
          rightLink: 'showpop'
        },
        slide_h: (window.document.body.offsetHeight - 50) + "px",
        popshow: false,
        agentApplyInfo:null,
        data: "",
      }
    },
    methods: {
      init(id) {
        this.$store.commit("saveLoadingMap", {
          "target": this.proAPI.URLS.getInformationById,
          lock: 1
        });
        this.proAPI.getJson(this.proAPI.URLS.getInformationById,{id:id}).then((res) => {
          this.data = res.data;
          this.navinfo.title = res.data.title;
        })
      },
      setDialoginfo(data){
        setTimeout(() => {
          this.init(data.id);
          this.visible = true;
        }, 500)
      },
    },
    beforeCreate: function () {
    },
    created: function () {
    },
    beforeMount: function () {
    },
    mounted: function () {

    },
    beforeUpdate: function () {
    },
    updated: function () {
    },
    activated: function () {
    },
    deactivated: function () {
    },
    beforeDestroy: function () {
    },
    destroyed: function () {
    },
    errorCaptured: function (err, vm, info) {
    },
    beforeRouteEnter(to,from,next){
      if(to.query.id!==null){
        next(vm =>vm.setDialoginfo(to.query));
      }
    }
  }
</script>
<style scoped>
</style>
